package org.ovirt.microvirt.beans.events;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAttribute;

@Entity
@Table(name="events")
@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS)
@DiscriminatorColumn(name="evtpye")
public abstract class Event implements Serializable {
	private static final long serialVersionUID = -2787579807152810759L;
	@Id
	@XmlAttribute(name="id")
	long id;
	@Column
	@XmlAttribute(name="occured")
	Date occured;
	@Column
	@XmlAttribute(name="handled")
	Date handled;
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public Date getOccured() {
		return occured;
	}
	public void setOccured(Date occured) {
		this.occured = occured;
	}
	public Date getHandled() {
		return handled;
	}
	public void setHandled(Date handled) {
		this.handled = handled;
	}
}
